isEven.ts
thoward37@gmail.com/shirt[create-new-file-src-capitalize-js] / isEven.ts
@ c6c8d3c5
Download
Ladder Summary
- file This file defines and exports an `isEven` function that takes a number argument and returns a boolean indicating whether the number is evenly divisible by two using the modulo operator.
/**
* Determines if a number is even.
*
* @param n - The number to check.
* @returns true if n is even, false otherwise.
*/
export function isEven(n: number): boolean {
return n % 2 === 0;
}